package com.peng.spring.life;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author peng
 * @Date 2024-04-17 10:37
 */
public class TestLife {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.peng.spring.life");
        Life life = context.getBean(Life.class);
        System.out.println("4.使用bean");
        context.close();
        System.out.println("关闭容器");
    }

}
